//
//  UITabBarLikeButton.m
//  BarButtonItemTest
//
//  Created by nhn on 1/12/15.
//  Copyright (c) 2015 CNUIC. All rights reserved.
//

#import "UITabBarLikeButton.h"

@implementation UITabBarLikeButton

- (void)layoutSubviews {
    [super layoutSubviews];
    
    [self.titleLabel sizeToFit];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.frame = CGRectMake(0, self.bounds.size.height-self.titleLabel.frame.size.height, self.bounds.size.width, self.titleLabel.frame.size.height);
    
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.imageView.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height-self.titleLabel.frame.size.height-self.spaceBetweenImageAndLabel);
}

@end
